{% import "helpers/common.html" as common %}

{% extends 'layout.html' %}

{% block content %}
<h2>Liste des Clubs</h2>

<form method="get" class="form-inline">
    {{ common.saisonselect(activeSaison) }}
    <button type="submit" class="btn">Afficher</button>
</form>

{% if clubs|length > 0 %}
<table class="table">
    <thead>
        <tr>
            <th>Nom</th>
        </tr>
    </thead>

    <tbody>
        {% for club in clubs %}
        <tr>

            <td>
                <a href="{{ urlFor('club_view', {'nom_club': club['Nom_Club']}) }}">
                {{club['Nom_Club']}}
                </a>
            </td>
        </tr>
        {% endfor %}
    </tbody>
</table>
{% else %}
<p>Il n'y pas des clubs ici.</p>
{% endif %}

{{ common.btn('Nouveau club', 'clubs_create') }}

{% endblock %}
